package com.baizhi.cmfz.controller;

import com.baizhi.cmfz.annottation.AddCacheAnnotation;
import com.baizhi.cmfz.annottation.LogAnnottion;
import com.baizhi.cmfz.service.CmfzLogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.Map;

@Controller
@RequestMapping("/log")
public class CmfzLogController {
    @Autowired
    private CmfzLogService cmfzLogService;

    @RequestMapping("/selectByPageLog")
    @ResponseBody
    @LogAnnottion(type = "select", value = "查询日志")
    @AddCacheAnnotation
    public Map selectByPageCmfzLog(int page,int limit,String content,String field){
        System.out.println(content+"-----"+field);
        Map map = cmfzLogService.selectByPageCmfzLog(page, limit, content, field);
        return map;
        
    }
}
